const express = require('express');
const router = express.Router();

// user
const users = require('../controller/user_controller');
router.get('/getusers', users.getusers)
router.post('/loginuser', users.userLogin)
router.post('/registeruser', users.registeruser)
router.delete('/deleteuser', users.deleteuser)
router.put('/updatepassword', users.updatepassword)
router.put('/updateuser', users.updateuser)
router.get('/select_oneuser', users.select_oneuser)

// game
const games = require('../controller/game_controller')
router.get('/getgames', games.getgames)
router.post('/addgame', games.addgame)
router.delete('/deletegame', games.deletegame)
router.put('/updategame', games.updategame)
router.get('/get_onegames', games.get_onegames)

// role
const roles = require('../controller/role_controller')
router.get('/getroles', roles.getroles)
router.post('/addrole', roles.addrole)
router.delete('/deleterole', roles.deleterole)
router.put('/updaterole', roles.updaterole)
router.get('/get_onerole', roles.get_onerole)

// gametype
const gametypes = require('../controller/gametype_controller')
router.get('/getgametypes', gametypes.getgametypes)
router.post('/addgametype', gametypes.addgametype)
router.delete('/deletegametype', gametypes.deletegametype)
router.put('/updategametype', gametypes.updategametype)
router.get('/get_one_gametype', gametypes.get_one_gametype)

// copyrights
const copyrights = require('../controller/copyrights_controller')
router.get('/getcopyrights', copyrights.getcopyrights)
router.post('/addcopyright', copyrights.addcopyright)
router.delete('/deletecopyright', copyrights.deletecopyright)
router.put('/updatecopyright', copyrights.updatecopyright)
router.get('/get_one_copyright', copyrights.get_one_copyright)

// roletype
const roletypes = require('../controller/roletypes_controller')
router.get('/getroletypes', roletypes.getroletypes)
router.post('/addroletype', roletypes.addroletype)
router.delete('/deleteroletype', roletypes.deleteroletype)
router.put('/updateroletype', roletypes.updateroletype)
router.get('/get_one_roletype', roletypes.get_one_roletype)

// role_skin
const role_skins = require('../controller/role_skin_controller')
router.get('/getrole_skins', role_skins.getrole_skins)
router.post('/addrole_skin', role_skins.addrole_skin)
router.delete('/deleterole_skin', role_skins.deleterole_skin)
router.put('/updaterole_skin', role_skins.updaterole_skin)
router.get('/get_onerole_skin', role_skins.get_onerole_skin)

module.exports = router